module derelict.newton.newton;

import derelict.util.loader;

public import derelict.newton.types;
public import derelict.newton.funcs;


private void loadNewton(SharedLib lib)
{
	bindFunc(NewtonCreate)("NewtonCreate", lib);
	bindFunc(NewtonDestroy)("NewtonDestroy", lib);
	bindFunc(NewtonDestroyAllBodies)("NewtonDestroyAllBodies", lib);
	bindFunc(NewtonUpdate)("NewtonUpdate", lib);
	bindFunc(NewtonSetSolverModel)("NewtonSetSolverModel", lib);
	bindFunc(NewtonSetFrictionModel)("NewtonSetFrictionModel", lib);
	bindFunc(NewtonGetTimeStep)("NewtonGetTimeStep", lib);
	bindFunc(NewtonSetMinimumFrameRate)("NewtonSetMinimumFrameRate", lib);
	bindFunc(NewtonSetBodyLeaveWorldEvent)("NewtonSetBodyLeaveWorldEvent", lib);
	bindFunc(NewtonSetWorldSize)("NewtonSetWorldSize", lib);
	bindFunc(NewtonWorldFreezeBody)("NewtonWorldFreezeBody", lib);
	bindFunc(NewtonWorldUnfreezeBody)("NewtonWorldUnfreezeBody", lib);
	bindFunc(NewtonWorldForEachBodyDo)("NewtonWorldForEachBodyDo", lib);
	bindFunc(NewtonWorldSetUserData)("NewtonWorldSetUserData", lib);
	bindFunc(NewtonWorldGetUserData)("NewtonWorldGetUserData", lib);
	bindFunc(NewtonWorldGetVersion)("NewtonWorldGetVersion", lib);
	bindFunc(NewtonWorldRayCast)("NewtonWorldRayCast", lib);
	bindFunc(NewtonWorldCollide)("NewtonWorldCollide", lib);
	bindFunc(NewtonMaterialGetDefaultGroupID)("NewtonMaterialGetDefaultGroupID", lib);
	bindFunc(NewtonMaterialCreateGroupID)("NewtonMaterialCreateGroupID", lib);
	bindFunc(NewtonMaterialDestroyAllGroupID)("NewtonMaterialDestroyAllGroupID", lib);
	bindFunc(NewtonMaterialSetDefaultSoftness)("NewtonMaterialSetDefaultSoftness", lib);
	bindFunc(NewtonMaterialSetDefaultElasticity)("NewtonMaterialSetDefaultElasticity", lib);
	bindFunc(NewtonMaterialSetDefaultCollidable)("NewtonMaterialSetDefaultCollidable", lib);
	bindFunc(NewtonMaterialSetDefaultFriction)("NewtonMaterialSetDefaultFriction", lib);
	bindFunc(NewtonMaterialSetCollisionCallback)("NewtonMaterialSetCollisionCallback", lib);
	bindFunc(NewtonMaterialGetUserData)("NewtonMaterialGetUserData", lib);
	bindFunc(NewtonMaterialDisableContact)("NewtonMaterialDisableContact", lib);
	bindFunc(NewtonMaterialGetCurrentTimestep)("NewtonMaterialGetCurrentTimestep", lib);
	bindFunc(NewtonMaterialGetMaterialPairUserData)("NewtonMaterialGetMaterialPairUserData", lib);
	bindFunc(NewtonMaterialGetContactFaceAttribute)("NewtonMaterialGetContactFaceAttribute", lib);
	bindFunc(NewtonMaterialGetBodyCollisionID)("NewtonMaterialGetBodyCollisionID", lib);
	bindFunc(NewtonMaterialGetContactNormalSpeed)("NewtonMaterialGetContactNormalSpeed", lib);
	bindFunc(NewtonMaterialGetContactForce)("NewtonMaterialGetContactForce", lib);
	bindFunc(NewtonMaterialGetContactPositionAndNormal)("NewtonMaterialGetContactPositionAndNormal", lib);
	bindFunc(NewtonMaterialGetContactTangentDirections)("NewtonMaterialGetContactTangentDirections", lib);
	bindFunc(NewtonMaterialGetContactTangentSpeed)("NewtonMaterialGetContactTangentSpeed", lib);
	bindFunc(NewtonMaterialSetContactSoftness)("NewtonMaterialSetContactSoftness", lib);
	bindFunc(NewtonMaterialSetContactElasticity)("NewtonMaterialSetContactElasticity", lib);
	bindFunc(NewtonMaterialSetContactFrictionState)("NewtonMaterialSetContactFrictionState", lib);
	bindFunc(NewtonMaterialSetContactStaticFrictionCoef)("NewtonMaterialSetContactStaticFrictionCoef", lib);
	bindFunc(NewtonMaterialSetContactKineticFrictionCoef)("NewtonMaterialSetContactKineticFrictionCoef", lib);
	bindFunc(NewtonMaterialSetContactTangentAcceleration)("NewtonMaterialSetContactTangentAcceleration", lib);
	bindFunc(NewtonMaterialContactRotateTangentDirections)("NewtonMaterialContactRotateTangentDirections", lib);
	bindFunc(NewtonCreateNull)("NewtonCreateNull", lib);
	bindFunc(NewtonCreateSphere)("NewtonCreateSphere", lib);
	bindFunc(NewtonCreateBox)("NewtonCreateBox", lib);
	bindFunc(NewtonCreateCone)("NewtonCreateCone", lib);
	bindFunc(NewtonCreateCapsule)("NewtonCreateCapsule", lib);
	bindFunc(NewtonCreateCylinder)("NewtonCreateCylinder", lib);
	bindFunc(NewtonCreateChamferCylinder)("NewtonCreateChamferCylinder", lib);
	bindFunc(NewtonCreateConvexHull)("NewtonCreateConvexHull", lib);
	bindFunc(NewtonCreateConvexHullModifier)("NewtonCreateConvexHullModifier", lib);
	bindFunc(NewtonConvexHullModifierGetMatrix)("NewtonConvexHullModifierGetMatrix", lib);
	bindFunc(NewtonConvexHullModifierSetMatrix)("NewtonConvexHullModifierSetMatrix", lib);
	bindFunc(NewtonConvexCollisionSetUserID)("NewtonConvexCollisionSetUserID", lib);
	bindFunc(NewtonConvexCollisionGetUserID)("NewtonConvexCollisionGetUserID", lib);
	bindFunc(NewtonCreateCompoundCollision)("NewtonCreateCompoundCollision", lib);
	bindFunc(NewtonCreateUserMeshCollision)("NewtonCreateUserMeshCollision", lib);
	bindFunc(NewtonCreateTreeCollision)("NewtonCreateTreeCollision", lib);
	bindFunc(NewtonTreeCollisionBeginBuild)("NewtonTreeCollisionBeginBuild", lib);
	bindFunc(NewtonTreeCollisionAddFace)("NewtonTreeCollisionAddFace", lib);
	bindFunc(NewtonTreeCollisionEndBuild)("NewtonTreeCollisionEndBuild", lib);
	bindFunc(NewtonTreeCollisionSerialize)("NewtonTreeCollisionSerialize", lib);
	bindFunc(NewtonCreateTreeCollisionFromSerialization)("NewtonCreateTreeCollisionFromSerialization", lib);
	bindFunc(NewtonTreeCollisionGetFaceAtribute)("NewtonTreeCollisionGetFaceAtribute", lib);
	bindFunc(NewtonTreeCollisionSetFaceAtribute)("NewtonTreeCollisionSetFaceAtribute", lib);
	bindFunc(NewtonReleaseCollision)("NewtonReleaseCollision", lib);
	bindFunc(NewtonCollisionCalculateAABB)("NewtonCollisionCalculateAABB", lib);
	bindFunc(NewtonCollisionRayCast)("NewtonCollisionRayCast", lib);
	bindFunc(NewtonGetEulerAngle)("NewtonGetEulerAngle", lib);
	bindFunc(NewtonSetEulerAngle)("NewtonSetEulerAngle", lib);
	bindFunc(NewtonCreateBody)("NewtonCreateBody", lib);
	bindFunc(NewtonDestroyBody)("NewtonDestroyBody", lib);
	bindFunc(NewtonBodyAddForce)("NewtonBodyAddForce", lib);
	bindFunc(NewtonBodyAddTorque)("NewtonBodyAddTorque", lib);
	bindFunc(NewtonBodySetMatrix)("NewtonBodySetMatrix", lib);
	bindFunc(NewtonBodySetMatrixRecursive)("NewtonBodySetMatrixRecursive", lib);
	bindFunc(NewtonBodySetMassMatrix)("NewtonBodySetMassMatrix", lib);
	bindFunc(NewtonBodySetMaterialGroupID)("NewtonBodySetMaterialGroupID", lib);
	bindFunc(NewtonBodySetContinuousCollisionMode)("NewtonBodySetContinuousCollisionMode", lib);
	bindFunc(NewtonBodySetJointRecursiveCollision)("NewtonBodySetJointRecursiveCollision", lib);
	bindFunc(NewtonBodySetOmega)("NewtonBodySetOmega", lib);
	bindFunc(NewtonBodySetVelocity)("NewtonBodySetVelocity", lib);
	bindFunc(NewtonBodySetForce)("NewtonBodySetForce", lib);
	bindFunc(NewtonBodySetTorque)("NewtonBodySetTorque", lib);
	bindFunc(NewtonBodySetLinearDamping)("NewtonBodySetLinearDamping", lib);
	bindFunc(NewtonBodySetAngularDamping)("NewtonBodySetAngularDamping", lib);
	bindFunc(NewtonBodySetUserData)("NewtonBodySetUserData", lib);
	bindFunc(NewtonBodyCoriolisForcesMode)("NewtonBodyCoriolisForcesMode", lib);
	bindFunc(NewtonBodySetCollision)("NewtonBodySetCollision", lib);
	bindFunc(NewtonBodySetAutoFreeze)("NewtonBodySetAutoFreeze", lib);
	bindFunc(NewtonBodySetFreezeTreshold)("NewtonBodySetFreezeTreshold", lib);
	bindFunc(NewtonBodySetTransformCallback)("NewtonBodySetTransformCallback", lib);
	bindFunc(NewtonBodySetDestructorCallback)("NewtonBodySetDestructorCallback", lib);
	bindFunc(NewtonBodySetAutoactiveCallback)("NewtonBodySetAutoactiveCallback", lib);
	bindFunc(NewtonBodySetForceAndTorqueCallback)("NewtonBodySetForceAndTorqueCallback", lib);
	bindFunc(NewtonBodyGetWorld)("NewtonBodyGetWorld", lib);
	bindFunc(NewtonBodyGetUserData)("NewtonBodyGetUserData", lib);
	bindFunc(NewtonBodyGetCollision)("NewtonBodyGetCollision", lib);
	bindFunc(NewtonBodyGetMaterialGroupID)("NewtonBodyGetMaterialGroupID", lib);
	bindFunc(NewtonBodyGetContinuousCollisionMode)("NewtonBodyGetContinuousCollisionMode", lib);
	bindFunc(NewtonBodyGetJointRecursiveCollision)("NewtonBodyGetJointRecursiveCollision", lib);
	bindFunc(NewtonBodyGetMatrix)("NewtonBodyGetMatrix", lib);
	bindFunc(NewtonBodyGetMassMatrix)("NewtonBodyGetMassMatrix", lib);
	bindFunc(NewtonBodyGetInvMass)("NewtonBodyGetInvMass", lib);
	bindFunc(NewtonBodyGetOmega)("NewtonBodyGetOmega", lib);
	bindFunc(NewtonBodyGetVelocity)("NewtonBodyGetVelocity", lib);
	bindFunc(NewtonBodyGetForce)("NewtonBodyGetForce", lib);
	bindFunc(NewtonBodyGetTorque)("NewtonBodyGetTorque", lib);
	bindFunc(NewtonBodyGetSleepingState)("NewtonBodyGetSleepingState", lib);
	bindFunc(NewtonBodyGetAutoFreeze)("NewtonBodyGetAutoFreeze", lib);
	bindFunc(NewtonBodyGetLinearDamping)("NewtonBodyGetLinearDamping", lib);
	bindFunc(NewtonBodyGetAngularDamping)("NewtonBodyGetAngularDamping", lib);
	bindFunc(NewtonBodyGetAABB)("NewtonBodyGetAABB", lib);
	bindFunc(NewtonBodyGetFreezeTreshold)("NewtonBodyGetFreezeTreshold", lib);
	bindFunc(NewtonBodyGetTotalVolume)("NewtonBodyGetTotalVolume", lib);
	bindFunc(NewtonBodyAddBuoyancyForce)("NewtonBodyAddBuoyancyForce", lib);
	bindFunc(NewtonBodyForEachPolygonDo)("NewtonBodyForEachPolygonDo", lib);
	bindFunc(NewtonAddBodyImpulse)("NewtonAddBodyImpulse", lib);
	bindFunc(NewtonJointGetUserData)("NewtonJointGetUserData", lib);
	bindFunc(NewtonJointSetUserData)("NewtonJointSetUserData", lib);
	bindFunc(NewtonJointGetCollisionState)("NewtonJointGetCollisionState", lib);
	bindFunc(NewtonJointSetCollisionState)("NewtonJointSetCollisionState", lib);
	bindFunc(NewtonJointGetStiffness)("NewtonJointGetStiffness", lib);
	bindFunc(NewtonJointSetStiffness)("NewtonJointSetStiffness", lib);
	bindFunc(NewtonDestroyJoint)("NewtonDestroyJoint", lib);
	bindFunc(NewtonJointSetDestructor)("NewtonJointSetDestructor", lib);
	bindFunc(NewtonConstraintCreateBall)("NewtonConstraintCreateBall", lib);
	bindFunc(NewtonBallSetUserCallback)("NewtonBallSetUserCallback", lib);
	bindFunc(NewtonBallGetJointAngle)("NewtonBallGetJointAngle", lib);
	bindFunc(NewtonBallGetJointOmega)("NewtonBallGetJointOmega", lib);
	bindFunc(NewtonBallGetJointForce)("NewtonBallGetJointForce", lib);
	bindFunc(NewtonBallSetConeLimits)("NewtonBallSetConeLimits", lib);
	bindFunc(NewtonConstraintCreateHinge)("NewtonConstraintCreateHinge", lib);
	bindFunc(NewtonHingeSetUserCallback)("NewtonHingeSetUserCallback", lib);
	bindFunc(NewtonHingeGetJointAngle)("NewtonHingeGetJointAngle", lib);
	bindFunc(NewtonHingeGetJointOmega)("NewtonHingeGetJointOmega", lib);
	bindFunc(NewtonHingeGetJointForce)("NewtonHingeGetJointForce", lib);
	bindFunc(NewtonHingeCalculateStopAlpha)("NewtonHingeCalculateStopAlpha", lib);
	bindFunc(NewtonConstraintCreateSlider)("NewtonConstraintCreateSlider", lib);
	bindFunc(NewtonSliderSetUserCallback)("NewtonSliderSetUserCallback", lib);
	bindFunc(NewtonSliderGetJointPosit)("NewtonSliderGetJointPosit", lib);
	bindFunc(NewtonSliderGetJointVeloc)("NewtonSliderGetJointVeloc", lib);
	bindFunc(NewtonSliderGetJointForce)("NewtonSliderGetJointForce", lib);
	bindFunc(NewtonSliderCalculateStopAccel)("NewtonSliderCalculateStopAccel", lib);
	bindFunc(NewtonConstraintCreateCorkscrew)("NewtonConstraintCreateCorkscrew", lib);
	bindFunc(NewtonCorkscrewSetUserCallback)("NewtonCorkscrewSetUserCallback", lib);
	bindFunc(NewtonCorkscrewGetJointPosit)("NewtonCorkscrewGetJointPosit", lib);
	bindFunc(NewtonCorkscrewGetJointAngle)("NewtonCorkscrewGetJointAngle", lib);
	bindFunc(NewtonCorkscrewGetJointVeloc)("NewtonCorkscrewGetJointVeloc", lib);
	bindFunc(NewtonCorkscrewGetJointOmega)("NewtonCorkscrewGetJointOmega", lib);
	bindFunc(NewtonCorkscrewGetJointForce)("NewtonCorkscrewGetJointForce", lib);
	bindFunc(NewtonCorkscrewCalculateStopAlpha)("NewtonCorkscrewCalculateStopAlpha", lib);
	bindFunc(NewtonCorkscrewCalculateStopAccel)("NewtonCorkscrewCalculateStopAccel", lib);
	bindFunc(NewtonConstraintCreateUniversal)("NewtonConstraintCreateUniversal", lib);
	bindFunc(NewtonUniversalSetUserCallback)("NewtonUniversalSetUserCallback", lib);
	bindFunc(NewtonUniversalGetJointAngle0)("NewtonUniversalGetJointAngle0", lib);
	bindFunc(NewtonUniversalGetJointAngle1)("NewtonUniversalGetJointAngle1", lib);
	bindFunc(NewtonUniversalGetJointOmega0)("NewtonUniversalGetJointOmega0", lib);
	bindFunc(NewtonUniversalGetJointOmega1)("NewtonUniversalGetJointOmega1", lib);
	bindFunc(NewtonUniversalGetJointForce)("NewtonUniversalGetJointForce", lib);
	bindFunc(NewtonUniversalCalculateStopAlpha0)("NewtonUniversalCalculateStopAlpha0", lib);
	bindFunc(NewtonUniversalCalculateStopAlpha1)("NewtonUniversalCalculateStopAlpha1", lib);
	bindFunc(NewtonConstraintCreateUpVector)("NewtonConstraintCreateUpVector", lib);
	bindFunc(NewtonUpVectorGetPin)("NewtonUpVectorGetPin", lib);
	bindFunc(NewtonUpVectorSetPin)("NewtonUpVectorSetPin", lib);
	bindFunc(NewtonConstraintCreateUserJoint)("NewtonConstraintCreateUserJoint", lib);
	bindFunc(NewtonUserJointAddLinearRow)("NewtonUserJointAddLinearRow", lib);
	bindFunc(NewtonUserJointAddAngularRow)("NewtonUserJointAddAngularRow", lib);
	bindFunc(NewtonUserJointSetRowMinimunFriction)("NewtonUserJointSetRowMinimunFriction", lib);
	bindFunc(NewtonUserJointSetRowMaximunFriction)("NewtonUserJointSetRowMaximunFriction", lib);
	bindFunc(NewtonUserJointSetRowAcceleration)("NewtonUserJointSetRowAcceleration", lib);
	bindFunc(NewtonUserJointSetRowStiffness)("NewtonUserJointSetRowStiffness", lib);
	bindFunc(NewtonUserJointGetRowForce)("NewtonUserJointGetRowForce", lib);
	bindFunc(NewtonCreateRagDoll)("NewtonCreateRagDoll", lib);
	bindFunc(NewtonDestroyRagDoll)("NewtonDestroyRagDoll", lib);
	bindFunc(NewtonRagDollBegin)("NewtonRagDollBegin", lib);
	bindFunc(NewtonRagDollEnd)("NewtonRagDollEnd", lib);
	bindFunc(NewtonRagDollFindBone)("NewtonRagDollFindBone", lib);
	// bindFunc(NewtonRagDollGetRootBone)("NewtonRagDollGetRootBone", lib);
	bindFunc(NewtonRagDollSetForceAndTorqueCallback)("NewtonRagDollSetForceAndTorqueCallback", lib);
	bindFunc(NewtonRagDollSetTransformCallback)("NewtonRagDollSetTransformCallback", lib);
	bindFunc(NewtonRagDollAddBone)("NewtonRagDollAddBone", lib);
	bindFunc(NewtonRagDollBoneGetUserData)("NewtonRagDollBoneGetUserData", lib);
	bindFunc(NewtonRagDollBoneGetBody)("NewtonRagDollBoneGetBody", lib);
	bindFunc(NewtonRagDollBoneSetID)("NewtonRagDollBoneSetID", lib);
	bindFunc(NewtonRagDollBoneSetLimits)("NewtonRagDollBoneSetLimits", lib);
	bindFunc(NewtonRagDollBoneGetLocalMatrix)("NewtonRagDollBoneGetLocalMatrix", lib);
	bindFunc(NewtonRagDollBoneGetGlobalMatrix)("NewtonRagDollBoneGetGlobalMatrix", lib);
	bindFunc(NewtonConstraintCreateVehicle)("NewtonConstraintCreateVehicle", lib);
	bindFunc(NewtonVehicleReset)("NewtonVehicleReset", lib);
	bindFunc(NewtonVehicleSetTireCallback)("NewtonVehicleSetTireCallback", lib);
	bindFunc(NewtonVehicleAddTire)("NewtonVehicleAddTire", lib);
	bindFunc(NewtonVehicleRemoveTire)("NewtonVehicleRemoveTire", lib);
	bindFunc(NewtonVehicleBalanceTires)("NewtonVehicleBalanceTires", lib);
	bindFunc(NewtonVehicleGetFirstTireID)("NewtonVehicleGetFirstTireID", lib);
	bindFunc(NewtonVehicleGetNextTireID)("NewtonVehicleGetNextTireID", lib);
	bindFunc(NewtonVehicleTireIsAirBorne)("NewtonVehicleTireIsAirBorne", lib);
	bindFunc(NewtonVehicleTireLostSideGrip)("NewtonVehicleTireLostSideGrip", lib);
	bindFunc(NewtonVehicleTireLostTraction)("NewtonVehicleTireLostTraction", lib);
	bindFunc(NewtonVehicleGetTireUserData)("NewtonVehicleGetTireUserData", lib);
	bindFunc(NewtonVehicleGetTireOmega)("NewtonVehicleGetTireOmega", lib);
	bindFunc(NewtonVehicleGetTireNormalLoad)("NewtonVehicleGetTireNormalLoad", lib);
	bindFunc(NewtonVehicleGetTireSteerAngle)("NewtonVehicleGetTireSteerAngle", lib);
	bindFunc(NewtonVehicleGetTireLateralSpeed)("NewtonVehicleGetTireLateralSpeed", lib);
	bindFunc(NewtonVehicleGetTireLongitudinalSpeed)("NewtonVehicleGetTireLongitudinalSpeed", lib);
	bindFunc(NewtonVehicleGetTireMatrix)("NewtonVehicleGetTireMatrix", lib);
	bindFunc(NewtonVehicleSetTireTorque)("NewtonVehicleSetTireTorque", lib);
	bindFunc(NewtonVehicleSetTireSteerAngle)("NewtonVehicleSetTireSteerAngle", lib);
	bindFunc(NewtonVehicleSetTireMaxSideSleepSpeed)("NewtonVehicleSetTireMaxSideSleepSpeed", lib);
	bindFunc(NewtonVehicleSetTireSideSleepCoeficient)("NewtonVehicleSetTireSideSleepCoeficient", lib);
	bindFunc(NewtonVehicleSetTireMaxLongitudinalSlideSpeed)("NewtonVehicleSetTireMaxLongitudinalSlideSpeed", lib);
	bindFunc(NewtonVehicleSetTireLongitudinalSlideCoeficient)("NewtonVehicleSetTireLongitudinalSlideCoeficient", lib);
	bindFunc(NewtonVehicleTireCalculateMaxBrakeAcceleration)("NewtonVehicleTireCalculateMaxBrakeAcceleration", lib);
	bindFunc(NewtonVehicleTireSetBrakeAcceleration)("NewtonVehicleTireSetBrakeAcceleration", lib);
}


GenericLoader DerelictNewton;
static this()
{
	DerelictNewton.setup(	"newton.dll",	// the Windows shared library name(s)
							"libNewton.so",	// the Linux shared library name(s)
							"",				// the Mac shared library name(s)
							&loadNewton		// the load function where your bindFunc calls are
		);
}
